package cn.com.lms.business.core.constant;

/**
 * @ClassName ErrorEnum
 * @Description 异常定义
 * @author barry
 * @Date 2020/2/18
 * @Version V1.0
 **/
public enum ErrorEnum {

    PARAMETER_CANNOT_BE_EMPTY(1011, "参数有误！！"),
    TOKEN_VERIFICATION_ERROR(1012, "修改密码token验证错误!"),
    MAIL_FAILED(1013, "邮件发送失败！"),
    QUESTION_EXIST(1014, "该分类下还有题库，若要删除分类，请先修改题库的所属分类"),
    QUESTION_SUBJECT_EXIST(1015, "该分类下还有题目，若要删除题库，请先修改题目的所属题库"),
    CATEGORY_CHILD_EXIST(1016, "该分类下还有子分类，若要删除分类，请先删除子分类"),
    CATEGORY_NAME_EXIST(1017, "该分类下有相同分类名称"),
    PAPER_SUIBJECT_EXIST(1018, "不能删除关联试卷的试题"),
    RECORD_NOT_EXIST(1010, "资源不存在！！"),
    EXERCISE_EXIST(5000,"试题已存在");

    private int code;
    private String message;

    private ErrorEnum(int code, String msg) {
        this.code = code;
        this.message = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
